package com.wiscamp.ninechapters.problems.enums;

/**
 * 答案类型枚举
 */
public enum AnswerTypes {
    NONE(0, "NONE"),

    OPTION(122001, "选项-单选选项"),
    INTEGER(122002, "数-整数"),
    DECIMAL(122003, "数-有限小数"),
    FRACTION(122004, "数-分数"),
    PERCENT(122005, "数-百分数"),
    RADICAL_NUMBER(122006, "数-根数"),
    LATEX(122007, "Latex"),
    TEXT(122008, "纯文本"),
    BOOLEAN(122009, "布尔值"),
    INTEGER_RANGE(122010, "数值范围-整数"),
    SCIENCE_NOTATION(122011, "数-科学计数法"),
    MULTIPLE_OPTION(122012, "选项-多选选项"),
    LOOP_DECIMAL_NUMBER(122013, "数-循环小数"),
    RATIONAL_NUMBER_RANGE(122014, "数值范围-有理数"),

    PLUS_MINUS_EXPRESSION(122015, "表达式-加减法运算"),
    TIMES_DIVISION_EXPRESSION(122016, "表达式-乘除法运算"),
    ARITHMETIC_EXPRESSION(122017, "表达式-算术运算"),

    PLUS_MINUS_EQUATION(122018, "等式-加减法运算"),
    TIMES_DIVISION_EQUATION(122019, "等式-乘除法运算"),
    ARITHMETIC_EQUATION(122020, "等式-算术运算"),

    PLUS_MINUS_INEQUALITY(122021, "不等式-加减法运算"),
    TIMES_DIVISION_INEQUALITY(122022, "不等式-乘除法运算"),
    ARITHMETIC_INEQUALITY(122023, "不等式-算术运算"),

    COMPARE_FORMULA(122024, "比较式-算术运算"),

    INTEGER_SERIES(122025, "整数数列-无序"),
    INTEGER_SERIES_ASC(122026, "整数数列-升序"),
    INTEGER_SERIES_DESC(122027, "整数数列-降序"),

    COMPARE_OPERATOR(122028, "运算符-比较"),
    ARITHMETIC_OPERATOR(122029, "运算符-算术"),

    TIME(122030, "日期时间-时间"),
    DATE(122031, "日期时间-日期"),
    DATE_TIME(122032, "日期时间"),

    RATIO(122033, "比与比例-比"),
    PROPORTION(122034, "比与比例-比例"),
    RATE(122035, "比与比例-比值"),


    MEASURE_UNIT_LENGTH(122036, "计量单位-长度"),
    MEASURE_UNIT_AREA(122037, "计量单位-面积"),
    MEASURE_UNIT_VOLUME(122038, "计量单位-体积"),
    MEASURE_UNIT_WEIGHT(122039, "计量单位-重量"),
    MEASURE_UNIT_CAPACITY(122040, "计量单位-容积"),

    GEOMETRY_ANGLE_DEGREE(122041, "几何-角度"),
    GEOMETRY_ANGLE_DENOTE(122042, "几何-角表示"),
    GEOMETRY_VERTEX_DENOTE(122043, "几何-顶点表示"),
    GEOMETRY_EDGE_DENOTE(122044, "几何-边表示"),
    GEOMETRY_TRIANGLE_DENOTE(122045, "几何-三角形表示"),
    GEOMETRY_QUADRILATERAL_DENOTE(122046, "几何-四边形表示"),
    GEOMETRY_PENTAGON_DENOTE(122047, "几何-五边形表示"),

    PROBABILITY(122048, "概率值"),

    EQUATION_SOLUTION(122049, "方程的解"),

    QUOTIENT_REMINDER(122050, "商及余数"),

    GEOMETRY_POINT_DENOTE(122051, "几何-线上的点表示"),

    GEOMETRY_XY_POINT_DENOTE(122052, "几何-平面上的点表示"),

    GEOMETRY_XYZ_POINT_DENOTE(122053, "几何-空间中的表示"),

    INTEGER_SERIES_SORTED(122054, "整数数列-有序"),

    MONEY_RMB(122055, "货币单位-人民币"),

    DECIMAL_RANGE(122056, "小数范围"),

    DECIMAL_SERIES(122057, "小数数列-无序"),
    DECIMAL_SERIES_ASC(122058, "小数数列-升序"),
    DECIMAL_SERIES_DESC(122059, "小数数列-降序"),

    DECIMAL_SERIES_SORTED(122060, "小数数列-有序"),

    GEOMETRY_ANGLE_EDGE_RELATION(122061, "角与边的关系"),

    INEQUALITY_SOLUTION(122062, "不等式的解"),

    MONEY_DOLLAR(122063, "货币单位-美元"),

    MONEY_EURO(122064, "货币单位-欧元");

    private final int value;

    private final String name;

    AnswerTypes(int value, String name) {
        this.value = value;
        this.name = name;
    }

    public String getName() {
        return name;
    }

    public int getValue() {
        return value;
    }

    public static AnswerTypes valueOf(int value) {
        return switch (value) {
            case 122001 -> AnswerTypes.OPTION;
            case 122002 -> AnswerTypes.INTEGER;
            case 122003 -> AnswerTypes.DECIMAL;
            case 122004 -> AnswerTypes.FRACTION;
            case 122005 -> AnswerTypes.PERCENT;
            case 122006 -> AnswerTypes.RADICAL_NUMBER;
            case 122007 -> AnswerTypes.LATEX;
            case 122008 -> AnswerTypes.TEXT;
            case 122009 -> AnswerTypes.BOOLEAN;
            case 122010 -> AnswerTypes.INTEGER_RANGE;
            case 122011 -> AnswerTypes.SCIENCE_NOTATION;
            case 122012 -> AnswerTypes.MULTIPLE_OPTION;
            case 122013 -> AnswerTypes.LOOP_DECIMAL_NUMBER;
            case 122014 -> AnswerTypes.RATIONAL_NUMBER_RANGE;
            case 122015 -> AnswerTypes.PLUS_MINUS_EXPRESSION;
            case 122016 -> AnswerTypes.TIMES_DIVISION_EXPRESSION;
            case 122017 -> AnswerTypes.ARITHMETIC_EXPRESSION;
            case 122018 -> AnswerTypes.PLUS_MINUS_EQUATION;
            case 122019 -> AnswerTypes.TIMES_DIVISION_EQUATION;
            case 122020 -> AnswerTypes.ARITHMETIC_EQUATION;
            case 122021 -> AnswerTypes.PLUS_MINUS_INEQUALITY;
            case 122022 -> AnswerTypes.TIMES_DIVISION_INEQUALITY;
            case 122023 -> AnswerTypes.ARITHMETIC_INEQUALITY;
            case 122024 -> AnswerTypes.COMPARE_FORMULA;
            case 122025 -> AnswerTypes.INTEGER_SERIES;
            case 122026 -> AnswerTypes.INTEGER_SERIES_ASC;
            case 122027 -> AnswerTypes.INTEGER_SERIES_DESC;
            case 122028 -> AnswerTypes.COMPARE_OPERATOR;
            case 122029 -> AnswerTypes.ARITHMETIC_OPERATOR;
            case 122030 -> AnswerTypes.TIME;
            case 122031 -> AnswerTypes.DATE;
            case 122032 -> AnswerTypes.DATE_TIME;
            case 122033 -> AnswerTypes.RATIO;
            case 122034 -> AnswerTypes.PROPORTION;
            case 122035 -> AnswerTypes.RATE;
            case 122036 -> AnswerTypes.MEASURE_UNIT_LENGTH;
            case 122037 -> AnswerTypes.MEASURE_UNIT_AREA;
            case 122038 -> AnswerTypes.MEASURE_UNIT_VOLUME;
            case 122039 -> AnswerTypes.MEASURE_UNIT_WEIGHT;
            case 122040 -> AnswerTypes.MEASURE_UNIT_CAPACITY;
            case 122041 -> AnswerTypes.GEOMETRY_ANGLE_DEGREE;
            case 122042 -> AnswerTypes.GEOMETRY_ANGLE_DENOTE;
            case 122043 -> AnswerTypes.GEOMETRY_VERTEX_DENOTE;
            case 122044 -> AnswerTypes.GEOMETRY_EDGE_DENOTE;
            case 122045 -> AnswerTypes.GEOMETRY_TRIANGLE_DENOTE;
            case 122046 -> AnswerTypes.GEOMETRY_QUADRILATERAL_DENOTE;
            case 122047 -> AnswerTypes.GEOMETRY_PENTAGON_DENOTE;
            case 122048 -> AnswerTypes.PROBABILITY;
            case 122049 -> AnswerTypes.EQUATION_SOLUTION;
            case 122050 -> AnswerTypes.QUOTIENT_REMINDER;
            case 122051 -> AnswerTypes.GEOMETRY_POINT_DENOTE;
            case 122052 -> AnswerTypes.GEOMETRY_XY_POINT_DENOTE;
            case 122053 -> AnswerTypes.GEOMETRY_XYZ_POINT_DENOTE;
            case 122054 -> AnswerTypes.INTEGER_SERIES_SORTED;
            case 122055 -> AnswerTypes.MONEY_RMB;
            case 122056 -> AnswerTypes.DECIMAL_RANGE;
            case 122057 -> AnswerTypes.DECIMAL_SERIES;
            case 122058 -> AnswerTypes.DECIMAL_SERIES_ASC;
            case 122059 -> AnswerTypes.DECIMAL_SERIES_DESC;
            case 122060 -> AnswerTypes.DECIMAL_SERIES_SORTED;
            case 122061 -> AnswerTypes.GEOMETRY_ANGLE_EDGE_RELATION;
            case 122062 -> AnswerTypes.INEQUALITY_SOLUTION;
            case 122063 -> AnswerTypes.MONEY_DOLLAR;
            case 122064 -> AnswerTypes.MONEY_EURO;
            default -> AnswerTypes.NONE;
        };
    }
}
